{% extends "voc/base_site.html" %}
{% load markup %}

{% block title %}{{ unit.title }}{% endblock %}

{% block content %}

<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ unit.parent.get_absolute_url }}">{{ unit.parent }}</a></div>

<h1>{{ unit.title }}</h1>

{% if unit.body %}
<p>{{ unit.body|restructuredtext }}</p>
{% endif %}

{% if unit.question %}
<p>{{ unit.question|restructuredtext }}</p>
{% endif %}

{% if unit.answer %}
<p>Answer:</p>
<p>{{ unit.answer|restructuredtext }}</p>
{% endif %}

{% if unit.vocabulary %}
<p>Vocabulary:</p>
<ul class="objectlist">
{% for entry in unit.entry_set.all %}
<li class="{% cycle 'odd' 'even' %}"><a href="{{ entry.get_absolute_url }}">{{ entry }}</a></li>
{% endfor %}
</ul>
{% endif %}

<ul class="objectlist">
{% for child in unit.children.all %}
<li class="{% cycle 'odd' 'even' %}"><a href="{{ child.get_absolute_url }}">{{ child }}</a></li>
{% endfor %}
</ul>

{% endblock %}
